package org.spring.mongodb.example;

import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
//import org.springframework.data.annotation.PersistenceConstructor;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
//import org.springframework.data.mongodb.core.mapping.Field;

@Document(collection = "OM_AREA")
public class OmAreaBean {

	@Id
	private ObjectId id;

	@Indexed(unique = true)
//	@Field("AREA_ID")
	private Integer areaId; // 区域标识

//	@Field("AREA_NAME")
	private String areaName; // 区域名称

//	@Field("AREA_CODE")
	private String areaCode; // 区域编码

//	@Field("PARNT_AREA_ID")
	private Integer parntAreaId; // 上级区域

//	@Field("AREA_DESC")
	private String areaDesc; // 区域描述

	public OmAreaBean() {
		areaId = null;
		areaName = null;
		areaCode = null;
		parntAreaId = null;
		areaDesc = null;
	}
	
	
	public OmAreaBean(Integer areaId, String areaName, String areaCode,
			Integer parntAreaId, String areaDesc) {
		this.areaId = areaId;
		this.areaName = areaName;
		this.areaCode = areaCode;
		this.parntAreaId = parntAreaId;
		this.areaDesc = areaDesc;
	}

	public ObjectId getId() {
		return id;
	}

	public void setId(ObjectId id) {
		this.id = id;
	}

	public Integer getAreaId() {
		return areaId;
	}

	public void setAreaId(Integer areaId) {
		this.areaId = areaId;
	}

	public String getAreaName() {
		return areaName;
	}

	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public Integer getParntAreaId() {
		return parntAreaId;
	}

	public void setParntAreaId(Integer parntAreaId) {
		this.parntAreaId = parntAreaId;
	}

	public String getAreaDesc() {
		return areaDesc;
	}

	public void setAreaDesc(String areaDesc) {
		this.areaDesc = areaDesc;
	}

}
